<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="css/room.css">
    <script src="../js/axios.min.js"></script>
    <script src="../js/query.js"></script>
    <script src="../roomjs/room.js"></script>
</head>
<body>
<div>
    <table border="1" cellspacing="0" width="700px">
        <thead>
        <tr><td>房间地址</td><td>可容纳人数</td><td>已住人数</td><td>房间状态</td><td>房间类型</td><td>操作</td></tr>
        </thead>
        <tbody id="data">

        </tbody>

    </table>
    <div id="cutDiv"></div>
    <div id="underDiv">
        <div id="addRoomDiv">
            <input type="button" value="添加房间" onclick="showAddDiv()">
        </div>

        <div id="queryDiv">
            <h5>查询学生信息</h5>
            房间地址<input type="text" id="nameTxt" style="width: 130px"> 房间状态<select id="statusSelect"><option>不限</option><option>正常</option><option>设施损坏</option></select>
            可住房间<select id="liveSelect"><option>不限</option><option>可住房间</option></select>房间类型<select id="typeSelect"><option>不限</option><option>男生宿舍</option><option>女生宿舍</option></select><br>

            <input type="button" value="查找" onclick="findAll(1)">
        </div>
    </div>
    <div id="addDiv" >
        <div>
            <h5>添加房间信息</h5>
        </div>
        <div>
            房间地址<input type="text" id="roomName"><br>
            可容纳人数<input type="text" id="num"><br>
            房间类型<select id="roomSelect"><option>男生宿舍</option><option>女生宿舍</option></select><br>
            <input type="button" value="添加" onclick="addRoom()"> <input type="button" value="取消" onclick="exit()">
        </div>
    </div>
    <div id="infoDiv" >
        <div>
            <h5>删除房间</h5>
        </div>
        <div>
            <span>该房间还有人住，不能删除</span>
            <input type="button" value="确定" onclick="exit()">
        </div>
    </div>
    <div id="roomDiv" >
        <div>
            <h5>查看房间信息</h5>
        </div>
        <div>
            房间地址<span id="addressSpan"></span> 可容纳人数<span id="maxNumSpan"></span><br>
            房间状态<span id="statusSpan"></span> 已住人数<span id="nowNumSpan"></span><br>
            房间类型<span id="typeSpan"></span><br>
            <div>
                <div style="overflow-y: scroll;height: 100px">
            <table border="1" cellspacing="0" width="100%">
                <thead>
                <tr>
                    <td>学生姓名</td>
                    <td>所在班级</td>
                    <td>联系电话</td>
                </tr>
                </thead>
                <tbody id="stuData">

                </tbody>
            </table>
                </div>
            </div>
            <input type="button" value="确定" onclick="exit()">
        </div>
    </div>
    <div id="facDiv" >
        <div>
            <h5>房间设施维护</h5>
        </div>
        <div >
            <input type="hidden" id="id">
            <div style="overflow-y: scroll;height: 150px">
            <table border="1" cellspacing="0" width="100%">
                <thead>
                <tr>
                    <td>损坏描述</td>
                    <td>报损日期</td>
                    <td>是否解决</td>
                    <td>处理设施</td>
                </tr>
                </thead>
                <tbody id="facData">

                </tbody>
            </table>
            </div>
            损坏描述<textarea id="textarea"></textarea><br>
            <input id="facBtn" type="hidden">
            <input  type="button" value="添加设施损坏记录" onclick="addFac()">
            <input type="button" value="退出" onclick="exit()">
        </div>
    </div>
</div>
</body>
</html>